package com.cosmocoder.persistence;

import java.io.Serializable;
import java.util.Collection;
import java.util.Map;

public interface Dao<EntityType, IdType extends Serializable> {
	public EntityType get (IdType id);
	public Collection<EntityType> getByProperty(String property, Object value);
	public Collection<EntityType> getByProperties(Map<String,Object> propetiesMap);
	public Collection<EntityType> getAll ();
	public EntityType makePersistent(EntityType entity);
	public EntityType makeTransient(EntityType entity);
	public void clear();
	public void flush();
}
